

#ifndef UC_GEENT3D_H
#define UC_GEENT3D_H

#include "zgegbl.h"
#include "zgepnt3d.h"
#include "zgeent2d.h"
#include "zgeintrvl.h"
#include "zgegblnew.h"
#pragma pack (push, 8)

class
GE_DLLEXPIMPORT
UcGeEntity3d
{
public:
    ~UcGeEntity3d();

    ZSoft::Boolean   isKindOf    (UcGe::EntityId entType) const;
    UcGe::EntityId   type        () const;

    UcGeEntity3d*    copy        () const;
    UcGeEntity3d&    operator =  (const UcGeEntity3d& entity);

    ZSoft::Boolean   operator == (const UcGeEntity3d& entity) const;
    ZSoft::Boolean   operator != (const UcGeEntity3d& entity) const;
    ZSoft::Boolean   isEqualTo   (const UcGeEntity3d& ent,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    UcGeEntity3d&    transformBy (const UcGeMatrix3d& xfm);
    UcGeEntity3d&    translateBy (const UcGeVector3d& translateVec);
    UcGeEntity3d&    rotateBy    (double angle, const UcGeVector3d& vec,
                                  const UcGePoint3d& wrtPoint = UcGePoint3d::kOrigin);
    UcGeEntity3d&    mirror      (const UcGePlane& plane);
    UcGeEntity3d&    scaleBy     (double scaleFactor,
                                  const UcGePoint3d& wrtPoint
                                  = UcGePoint3d::kOrigin);

    ZSoft::Boolean   isOn        (const UcGePoint3d& pnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
protected:
    friend class UcGeImpEntity3d;
    UcGeImpEntity3d  *mpImpEnt;
    int              mDelEnt;
    UcGeEntity3d ();
    UcGeEntity3d (const UcGeEntity3d&);
    UcGeEntity3d (UcGeImpEntity3d&, int);
    UcGeEntity3d (UcGeImpEntity3d*);
    UcGeEntity2d* newEntity2d (UcGeImpEntity3d*) const;
    UcGeEntity2d* newEntity2d (UcGeImpEntity3d&, int) const;
    UcGeEntity3d* newEntity3d (UcGeImpEntity3d*) const;
    UcGeEntity3d* newEntity3d (UcGeImpEntity3d&, int) const;
};

ZSOFT_FORCE_INLINE UcGeEntity2d*
UcGeEntity3d::newEntity2d (UcGeImpEntity3d *impEnt ) const
{
    return GENEWLOC( UcGeEntity2d, this) ( impEnt );
}

ZSOFT_FORCE_INLINE UcGeEntity3d*
UcGeEntity3d::newEntity3d (UcGeImpEntity3d *impEnt ) const
{
    return GENEWLOC( UcGeEntity3d, this) ( impEnt );
}

ZSOFT_FORCE_INLINE UcGeEntity3d*
UcGeEntity3d::newEntity3d(UcGeImpEntity3d& impEnt, int dummy) const
{
    return GENEWLOC( UcGeEntity3d, this)(impEnt, dummy);
}

ZSOFT_FORCE_INLINE UcGeEntity2d*
UcGeEntity3d::newEntity2d(UcGeImpEntity3d& impEnt, int dummy) const
{
    return GENEWLOC( UcGeEntity2d, this)(impEnt, dummy);
}

#pragma pack (pop)
#endif
